using Lzfy_Refund_Service.Models;

namespace Lzfy_Refund_Service.Repositories
{
    /// <summary>
    /// 患者退费密码仓储接口
    /// </summary>
    public interface IPatientRefundPasswordRepository
    {
        /// <summary>
        /// 更新患者退费密码相关信息
        /// </summary>
        /// <param name="request">更新请求</param>
        /// <returns>更新时间，如果更新失败则返回null</returns>
        Task<DateTime?> UpdatePatientRefundPasswordAsync(PatientRefundPasswordUpdateRequest request);

        /// <summary>
        /// 检查患者是否存在
        /// </summary>
        /// <param name="patientId">患者ID</param>
        /// <returns>是否存在</returns>
        Task<bool> PatientExistsAsync(string patientId);

        /// <summary>
        /// 删除退费密码日志记录（用于回滚操作）
        /// </summary>
        /// <param name="patientId">患者ID</param>
        /// <param name="modifyTime">修改时间</param>
        /// <returns>是否删除成功</returns>
        Task<bool> DeleteRefundPasswordLogAsync(string patientId, DateTime modifyTime);
    }
}